﻿Imports System.Runtime.CompilerServices

Module Globals

	Public MainColor As Color = Color.FromArgb(200, 208, 200)
	Public SecondaryColor As Color = Color.FromArgb(255, 192, 0)


	<Extension()>
	Function AsText(col As Color) As String
		Return col.R & ";" & col.G & ";" & col.B
	End Function

	<Extension()>
	Function ToColor(t As String, Empty As Color) As Color
		If t = "" Then Return Empty
		Dim i = t.Split(";")
		Return Color.FromArgb(i(0), i(1), i(2))
	End Function

End Module
